
import 'dart:convert';
import 'package:ichinesereader/models/knowledgeword/knowledgeFolderTreeResult.dart';

KnowledgeWordsTrashResult knowledgeWordsTrashResultFromJson(String str) =>
    KnowledgeWordsTrashResult.fromJson(json.decode(str));

String knowledgeWordsTrashResultToJson(KnowledgeWordsTrashResult data) =>
    json.encode(data.toJson());

class KnowledgeWordsTrashResult {
  KnowledgeWordsTrashResult({
    this.status,
    this.message,
    this.result,
  });

  int? status;
  String? message;
  WordFolder? result;

  factory KnowledgeWordsTrashResult.fromJson(Map<String, dynamic> json) =>
      KnowledgeWordsTrashResult(
        status: json["status"],
        message: json["message"],
        result: json["result"] != null ? WordFolder.fromJson(json["result"]) : null,
      );

  Map<String, dynamic> toJson() => {
        "status": status,
        "message": message,
        "result": result?.toJson(),
      };
}

// class Result {
//   Result({
//     this.folders,
//     this.name,
//     this.id,
//     this.shareStudents,
//   });

//   List<Result>? folders;
//   String? name;
//   String? id;
//   List<dynamic>? shareStudents;

//   factory Result.fromJson(Map<String, dynamic> json) => Result(
//         folders:
//             List<Result>.from(json["folders"].map((x) => Result.fromJson(x))),
//         name: json["name"],
//         id: json["id"],
//         shareStudents: json["shareStudents"] == null
//             ? null
//             : List<dynamic>.from(json["shareStudents"].map((x) => x)),
//       );

//   Map<String, dynamic> toJson() => {
//         "folders": List<dynamic>.from(folders!.map((x) => x.toJson())),
//         "name": name,
//         "id": id,
//         "shareStudents": shareStudents == null
//             ? null
//             : List<dynamic>.from(shareStudents!.map((x) => x)),
//       };
// }
